﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TpData.Layer;
using TpBaseObjects.Objects;

namespace TpData.Manager {
    public class OrganisationDataManager {

        public static Organisation LoadOrganisation(string name, string suchbegriff) {
            using (OrganisationDataLayer dl = CreateOrganisationDataLayer()) {
                return dl.LoadOrganisation(name, suchbegriff);
            }
        }

        public static Organisation LoadOrganisation(string name, int plz) {
            using (OrganisationDataLayer dl = CreateOrganisationDataLayer()) {
                return dl.LoadOrganisation(name, plz);
            }
        }

        private static OrganisationDataLayer CreateOrganisationDataLayer() {
            return (DataManager.CreateDataLayer(typeof(OrganisationDataLayer)) as OrganisationDataLayer);
        }

    }
}
